package imgsei.wcj.com.medalmodule.presenter;

import android.content.Context;

import java.util.Map;

import imgsei.wcj.com.commonbusiness.base.presenter.BasePresenterImp;
import imgsei.wcj.com.commonbusiness.interfaces.presenter.BasePresenter;
import imgsei.wcj.com.medalmodule.api.MedalServiceApi;
import imgsei.wcj.com.medalmodule.bean.WeatherInfoBean;
import imgsei.wcj.com.medalmodule.model.WeatherModelImp;
import imgsei.wcj.com.medalmodule.view.WeatherView;

public class WeatherPresenterImp extends BasePresenterImp<WeatherView, WeatherInfoBean> implements BasePresenter {

    private Context context;
    private WeatherModelImp weatherModelImp = null;

    public WeatherPresenterImp(WeatherView iBaseView, Context context) {
        super(iBaseView);
        this.context = context;
        this.weatherModelImp = new WeatherModelImp(context);

    }

    @Override
    public void loadWeather( Map<String,String> params) {
        String url = MedalServiceApi.LOG_IN;
        weatherModelImp.loadWeather(url,params,this);
    }

    @Override
    public void unSubscribe() {
        weatherModelImp.onUnsubscribe();
    }
}
